package main

//
import (
	"fmt"
	"log"
	"net/rpc"
	"rabbitmq/p2p/model"
)

func main() {
	clinet, err := rpc.Dial("tcp", ":8081")
	if err != nil {
		log.Println(err)
		return
	}

	msg := model.Msg{
		Type:    1,
		Message: "test1",
	}
	res := model.Res{}
	err = clinet.Call("Server.PushMessage", &msg, &res)
	if err != nil {
		log.Println(err)
		return
	}
	fmt.Println(res)
}
